Ext.define('passport.model.BusinessObjectModel', {
    extend: 'Ext.data.Model',
    requires: ['Ext.data.UuidGenerator'],
    idgen: 'uuid',
    fields: 
	    [
	    	{name: 'Id',					type: 'string'}, 
	    	{name: 'Code', 				type: 'string'},
	    	{name: 'ShortName', 	type: 'string'},
	    	{name: 'FullName', 		type: 'string'},
	    	{name: 'Comment', 		type: 'string'},
	    	{name: 'ModuleId', 		type: 'string'},
	    	{name: 'CreatedDate', 		type: 'date'},
	    	{name: 'CreatedBy', 		type: 'string'},
	    	{name: 'LastModifiedBy', 		type: 'string'},
	    	{name: 'LastVisitedDate', 		type: 'date'}
	    	{name: 'DeletedFlag', 		type: 'string', defaultValue: '0'}
	    
	    ],
	    validations: [
		  	{type: 'presence', field: 'Code'},
		  	{type: 'presence', field: 'ShortName'},
		  	{type: 'presence', field: 'FullName'},
		  	{type: 'presence', field: 'ModuleId'},
		  	{type: 'presence', field: 'CreatedDate'}
		],
	    proxy: {
		  	type: 'ajax',
		  	url: 'http://192.168.1.116:8077/Gateway.ashx?module=organization&action=BusinessObject&method=save',
		  	api: {
	        	destroy: 'http://192.168.1.116:8077/Gateway.ashx?module=product&action=BusinessObject&method=delete'
	        }
		},
	    idProperty: 'Id'
});